package com.fuze.energy.domain.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * @author sepc_
 * @date 4/19/2021 16:48
 */
@ApiModel(value = "BaseDTO")
@Data
public class BaseDTO implements Serializable {
    private static final long serialVersionUID = 413119464216926450L;

    /**
     * 页码 默认1
     */
    @ApiModelProperty(name = "pageNum", value = "页码")
    private Integer pageNum;

    /**
     * 每页显示条数 默认10
     */
    @ApiModelProperty(name = "pageSize", value = "每页显示条数")
    private Integer pageSize;

    public BaseDTO() {
        this.init();
    }

    public BaseDTO(Integer pageNum, Integer pageSize) {
        this.init();
        this.pageNum = pageNum;
        this.pageSize = pageSize;

    }

    private void init() {
        this.pageNum = 1;
        this.pageSize = 10;
    }
}
